package ebj.common.multithread.downloader;
public class StringUtil {
	public static String nullToEmpty(String string) {
		return (string == null) ? "" : string;
	}

	public static String emptyToNull(String string) {
		return isNullOrEmpty(string) ? null : string;
	}

	public static boolean isNullOrEmpty(String string) {
		return string == null || string.length() == 0; // string.isEmpty() in Java 6
	}

	public static boolean isNotNullOrEmpty(String string) {
		return !isNullOrEmpty(string);
	}
}